const Router = require("@koa/router");
const userController = require("../controllers/userController");
const router = new Router();

// 获取所有用户
router.get("/users", userController.getAllUsers);

// 获取单个用户信息
router.get("/users/:id", userController.getUserById);

// 创建新用户
router.post("/users", userController.createUser);

// 更新用户信息
router.put("/users/:id", userController.updateUser);

// 删除用户
router.delete("/users/:id", userController.deleteUser);

module.exports = router;
